//
//  FolderConfig.swift
//  imprint
//
//  Created by 小柠檬🍋 on 2025/2/2.
//

//目录配置
import Foundation
import GRDB

class FolderConfig : IDbTable,Identifiable ,Codable {
    static let databaseTableName = "FolderConfig"

    //db排除字段
    func doCustomDBExcluded()  -> [String? : Any?] {
        return doExcluded(subject: self, excluded: [""])
    }
    
    var id: Int? = nil
    var doubleRow:Bool = false
    var folderGridCount: Int = 3//格子试图数量
    var sort: Int = 0
    var diarySort : Int = 0
    var aiRoleList:[String]? = nil //ai人设的id 列表
    var aiRoleOften:String? = nil //常聊ai
    var callTimeStart:Int = 3600 * 9 //拨打电话时间
    var callTimeEnd: Int = 3599 * 24//拨打电话时间
    var dbFolderMainId: String? = nil//主相册（时光相册） 数据库id
    var pictureFolderMainId: String? = nil//主相册（时光相册） file_id  如云盘的目录id，，只有云盘在使用

    var modifySign: Bool = false//修改标识
}

extension FolderConfig {
    // db数据库指定字段
    public func encode(to container: inout PersistenceContainer) {
        doDBExcluded(to: &container)
    }
}
